#include "Precompiled.hpp"
#include "Player.h"
#include <stdio.h>
#include <tchar.h>
#include "Player_impl.h"

TCHAR buffer[1024];

Player::Player():impl_(new Player_impl())
{
}
Player::~Player()
{
   delete impl_;
}
bool Player::OpenFile(const std::wstring& file_name)
{
    impl_->OpenFile(file_name);
    return true;
}
bool Player::CloseFile()
{
    impl_->CloseFile();
    return true;
}
bool Player::Play()
{
    impl_->Play();
    return true;
}

bool Player::PlayFromTo(long start_pos, long end_pos)
{
    return impl_->PlayFromTo(start_pos, end_pos);
}
bool Player::PlayFrom(long pos)
{
    return impl_->PlayFrom(pos);
}

long Player::GetFileLength(){
    return impl_->GetFileLength();
}
long Player::GetCurrentPos()
{
    return impl_->GetCurrentPos();
}
void Player::Init(HWND wnd, HINSTANCE hInst)
{
    impl_->Init(wnd, hInst);
}
bool Player::Pause()
{
    return impl_->Pause();
}
bool Player::Stop()
{
   return impl_->Stop();
}
